<template>
	<view class="info_box">
		<view>
			<view class="addressTxt">{{locationInfo}}</view>
			<view></view>
		</view>
		<view class="" style="padding-left: 22rpx;font-size: 6rem;">{{locationWeather.temp}}°</view>
		<view class="weatherStatus">{{locationWeather.text}} 最高{{locationWeather.tempMax}}°
			最低{{locationWeather.tempMin}}°
		</view>
		<view class="buttonList df">
			<view class="buttonItem df" style="margin-right: 20rpx;">
				<text class="iconfont icon-shuyem" style="font-size: 32rpx;margin-right: 10rpx;"></text>
				空气质量{{locationWeather.category}}
			</view>
			<view class="buttonItem">空气指数{{locationWeather.aqi}}</view>
		</view>
		<view class="buttonList df">
			<view class="buttonItem df" style="margin-right: 20rpx;">
				<text class="iconfont icon-shuyem" style="font-size: 32rpx;margin-right: 10rpx;"></text>
				风力等级{{locationWeather.windScale}}
			</view>
			<view class="buttonItem">{{locationWeather.windDir}}</view>
		</view>
	</view>
</template>

<script setup lang="ts">
	const props = defineProps({
		locationWeather: {
			type: Object,
			required: true,
			default: () => ({})
		},
		locationInfo: {
			type: String,
			required: true,
		}
	})
</script>

<style scoped lang="scss">
	.info_box {
		margin-top: 40rpx;
		color: white;

		.addressTxt {
			padding-left: 22rpx;
			font-size: 48rpx;
		}

		.weatherStatus {
			margin-top: 22rpx;
			padding-left: 22rpx;
		}

		.buttonList {
			margin-top: 22rpx;

			.buttonItem {
				padding: 16rpx 22rpx;
				border-radius: 50rpx;
				background-color: rgba($color: #ffffff, $alpha: 0.5);
				font-size: 28rpx;
				align-items: center;
			}
		}
	}
</style>